<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
	<p:outputPanel id="painelPesquisa" rendered="#{tabelaINSSBean.modoPesquisa}">
		<p:panel header="Pesquisa de Tabela de INSS" id="painelPesquisaTabelaINSS">
			<p:focus for="descricaoPesquisa" id="focusPaginaPesquisa"/>
			<h:panelGrid columns="2" id="painel2ColunasPesquisa">
				<h:outputLabel for="descricaoPesquisa" id="labelDescricaoPesquisa" value="#{msg['label.tabelaINSS.descricao']}"/>
				<p:inputText value="#{tabelaINSSBean.entity.descricao}" id="descricaoPesquisa" size="60" maxlength="255" required="true" requiredMessage="#{msg['tabelaINSS.descricao.obrigatorio']}" title="#{msg['title.tabelaINSS.descricao']}"/>
			</h:panelGrid>
		</p:panel>
	</p:outputPanel>
	<p:outputPanel id="painelDetalhePesquisa" rendered="#{tabelaINSSBean.modoDetalhePesquisa}" >
		<p:dataTable value="#{tabelaINSSBean.listaEntities}" var="tabelaINSS" id="dataTableDetalhePesquisa" >
			<p:column id="colunaDescricaoTabelaINSS">
				<f:facet name="header"><h:outputText value="#{msg['label.aliquotaINSS.descricao']}" id="labelColunaDescricao"/></f:facet>
				<h:outputText value="#{tabelaINSS.descricao}" id="descricaoDetalhe"/>
			</p:column>
			<p:column style="text-align:center" id="colunaDataInicioVigencia">
				<f:facet name="header"><h:outputText value="#{msg['label.tabelaINSS.dataInicioVigencia']}" id="labelColunaDataInicioVigencia"/></f:facet>
				<h:outputText value="#{tabelaINSS.dataInicioVigencia}" id="dataInicioVigenciaDetalhe">
					<f:convertDateTime pattern="dd/MM/yyyy" locale="pt_BR" timeZone="America/Sao_Paulo"/>
				</h:outputText>
			</p:column>
			<p:column style="text-align:center" id="colunaDataTerminoVigencia">
				<f:facet name="header"><h:outputText value="#{msg['label.tabelaINSS.dataTerminoVigencia']}" id="labelColunaDataTerminoVigencia"/></f:facet>
				<h:outputText value="#{tabelaINSS.dataTerminoVigencia}" id="dataTerminoVigenciaDetalhe">
					<f:convertDateTime pattern="dd/MM/yyyy" locale="pt_BR" timeZone="America/Sao_Paulo"/>
				</h:outputText>
			</p:column>
			<p:column style="text-align:center" id="colunaBotaoEditar">
				<f:facet name="header"><h:outputText value="Editar" id="labelColunaEditar"/></f:facet>
				<p:commandLink update="form:painelGlobal, form:mensagens" actionListener="#{tabelaINSSBean.editar}" id="botaoEditarTabelaINSS">
					<h:graphicImage library="imagens" name="small_edit.png" id="imagemEditarTabelaINSS"/>
                	<f:setPropertyActionListener value="#{tabelaINSS}" target="#{tabelaINSSBean.entity}"/>  
            	</p:commandLink>
			</p:column>            	  
			<p:column style="text-align:center" id="colunaVisualizar">
				<f:facet name="header"><h:outputText value="Visualizar" id="labelColunaVisualizar"/></f:facet>
				<p:commandLink update="form:painelGlobal, form:mensagens" actionListener="#{tabelaINSSBean.visualizar}" id="botaoVisualizarTabelaINSS">
					<h:graphicImage library="imagens" name="small_find.png" id="imagemVisualizarTabelaINSS"/>
                	<f:setPropertyActionListener value="#{tabelaINSS}" target="#{tabelaINSSBean.entity}" />
				</p:commandLink>
			</p:column>
			<p:column style="text-align:center" id="colunaExcluir">
				<f:facet name="header"><h:outputText value="Excluir" id="labelExcluir"/></f:facet>
				<p:commandLink update="form:painelGlobal, form:mensagens" actionListener="#{tabelaINSSBean.iniciarExclusao}" id="botaoExcluirTabelaINSS">
					<h:graphicImage library="imagens" name="small_delete.png" id="imagemExcluirTabelaINSS"/>
                	<f:setPropertyActionListener value="#{tabelaINSS}" target="#{tabelaINSSBean.entity}" />
            	</p:commandLink>                        
			</p:column>
		</p:dataTable>
	</p:outputPanel>
</ui:composition>